package com.netistate.dao;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.netistate.base.BaseDao;
import com.netistate.pojo.ProjectTypeDefine;

@Repository
public class ProjectTypeDefineDao extends BaseDao<ProjectTypeDefine, Integer>{

	/**
	 * 根据serNo去找对应的infoNo并排序
	 * @param serNo
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public List<ProjectTypeDefine> findProjectTypeDefineBySerNo(String serNo) {
		String hql = "from ProjectTypeDefine where serviceNo = ? order by orders asc";
		Query query = getSession().createQuery(hql);
		query.setString(0, serNo);
		return query.list();
	}

}
